<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@page import="service.*,pojo.*,java.util.*" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
request.setCharacterEncoding("utf-8");
Customer cu=(Customer)session.getAttribute("a");
String pid=request.getParameter("p_id");
String image=request.getParameter("p_image");
Float price=Float.parseFloat(request.getParameter("p_price"));
String name=request.getParameter("p_name");
int quantity=Integer.parseInt(request.getParameter("quantity"));
int amount=Integer.parseInt(request.getParameter("amount"));
OrderService service=new OrderService();
Order order=new Order();
	order.setC_name(cu.getC_name());
	order.setP_id(pid);
	order.setP_image(image);
	order.setP_name(name);
	order.setP_price(price);
	order.setQuantity(quantity);
	order.setAmount(amount);
	int flag=service.addOrder(order);
	if(flag>0){
		%><table border="1">
		<tr>
			<th>订单编号</th>
			<th>用户名</th>
			<th>订单状态</th>
			<th>地址</th>
			<th>支付时间</th>
			<th>金额</th>
			<th>操作</th>
		</tr>

		<%
		
}
%>
</table>
</body>
</html>